﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;


namespace DataTier.Entities
{
    /// <summary>
    /// Композитный тип данных, возвращающий объединенный объект Продукт
    /// </summary>
    [Serializable]
    public class ProductEntity
    {
        Product product;
        MeasureUnit measureUnit;

        
        public int ProductId
        {
            get { return (this.Product != null) ? this.Product.ProductId : 0; }
            set { productId = value; }
        }
        private int productId;

        
        public string ProductName
        {
            get { return (this.Product != null) ? this.Product.ProductName : ""; }
            set { productName = value; }
        }
        private string productName;


        
        public Product Product
        {
            get { return product; }
            set { product = value; }
        }

        
        public MeasureUnit MeasureUnit
        {
            get { return measureUnit; }
            set { measureUnit = value; }
        }

       
    }
}
